﻿@model ApiPackage
@{
    Layout = null;
    InvokeResult objInvokeResult = CheckApiPackageHandler.CheckApiPackage(Model);
    if (objInvokeResult.ResultCode != "Success")
    {
        this.CreateJsonResult(objInvokeResult);
    }
    objInvokeResult.Data = null;
    string courseTitle = Model.DbParameters.GetDictValue("CourseTitle");
    if (courseTitle.IsNull())
    {
        objInvokeResult.ResultCode = "CourseTitleNull";
        objInvokeResult.ResultMessage = "对不起，课程标题不能为空";
        this.CreateJsonResult(objInvokeResult);
    }
    string courseTag = Model.DbParameters.GetDictValue("CourseTag");
    if (courseTag.IsNull())
    {
        objInvokeResult.ResultCode = "CourseTagNull";
        objInvokeResult.ResultMessage = "对不起，课程标签不能为空";
        this.CreateJsonResult(objInvokeResult);
    }
    string coursePrice= Model.DbParameters.GetDictValue("CoursePrice");
    if (coursePrice.IsNull())
    {
        objInvokeResult.ResultCode = "CoursePriceNull";
        objInvokeResult.ResultMessage = "对不起，课程价格不能为空";
        this.CreateJsonResult(objInvokeResult);
    }
    this.CreateApiMessageConfigResult(Model, "MvcApiMessagePost");
    this.CreateCorsResult("http://192.168.1.128:8085");
    this.CreateJsonResult(objInvokeResult);
    this.CreateJsonpResult(new InvokeResult { ResultCode = "ResponseJsonpResult", ResultMessage = "测试响应结果" });
    this.CreateRedirectResult("/");
    this.CreateContentResult("返回字符串结果");
}